3.113 \(\int \frac{3+x^2}{(1+x^2)^2} \, dx\)

Optimal. Leaf size=14 \[ \frac{x}{x^2+1}+2 \tan ^{-1}(x) \]

[Out]

x/(1 + x^2) + 2*ArcTan[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0040127, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {385, 203} \[ \frac{x}{x^2+1}+2 \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[(3 + x^2)/(1 + x^2)^2,x]

[Out]

x/(1 + x^2) + 2*ArcTan[x]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{3+x^2}{\left (1+x^2\right )^2} \, dx &=\frac{x}{1+x^2}+2 \int \frac{1}{1+x^2} \, dx\\ &=\frac{x}{1+x^2}+2 \tan ^{-1}(x)\\ \end{align*}

Mathematica [A]  time = 0.0059902, size = 14, normalized size = 1. \[ \frac{x}{x^2+1}+2 \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Integrate[(3 + x^2)/(1 + x^2)^2,x]

[Out]

x/(1 + x^2) + 2*ArcTan[x]

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 15, normalized size = 1.1 \begin{align*}{\frac{x}{{x}^{2}+1}}+2\,\arctan \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+3)/(x^2+1)^2,x)

[Out]

x/(x^2+1)+2*arctan(x)

________________________________________________________________________________________

Maxima [A]  time = 1.49805, size = 19, normalized size = 1.36 \begin{align*} \frac{x}{x^{2} + 1} + 2 \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+3)/(x^2+1)^2,x, algorithm="maxima")

[Out]

x/(x^2 + 1) + 2*arctan(x)

________________________________________________________________________________________

Fricas [A]  time = 1.30389, size = 53, normalized size = 3.79 \begin{align*} \frac{2 \,{\left (x^{2} + 1\right )} \arctan \left (x\right ) + x}{x^{2} + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+3)/(x^2+1)^2,x, algorithm="fricas")

[Out]

(2*(x^2 + 1)*arctan(x) + x)/(x^2 + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.092744, size = 10, normalized size = 0.71 \begin{align*} \frac{x}{x^{2} + 1} + 2 \operatorname{atan}{\left (x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+3)/(x**2+1)**2,x)

[Out]

x/(x**2 + 1) + 2*atan(x)

________________________________________________________________________________________

Giac [A]  time = 1.64378, size = 19, normalized size = 1.36 \begin{align*} \frac{x}{x^{2} + 1} + 2 \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+3)/(x^2+1)^2,x, algorithm="giac")

[Out]

x/(x^2 + 1) + 2*arctan(x)